package com.gopay.common.domain.cps;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * @CpsBtContractInfo.java
 * @author MA HUAN
 * @2013-8-20 下午12:17:48 www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CPS_BT_CONTRACT_INFO")
public class CpsBtContractInfo implements java.io.Serializable {
    private static final long serialVersionUID = -8024140279979121024L;

    /**
     * 信息流水号
     */
    private int infoSq;

    /**
     * 乐观锁版本号
     */
    private int version;

    /**
     * 协议号
     */
    private String contractId;

    /**
     * 交易市场客户ID
     */
    private String marketCustId;

    /**
     * 交易市场监管账号
     */
    private String marketAcct;

    /**
     * 交易会员客户ID
     */
    private String memberCustId;

    /**
     * 交易会员账号
     */
    private String memberAcct;

    /**
     * 交易会员账户类型1 - 个人 2 - 企业
     */
    private int memberAcctType;

    /**
     * 协议状态1 - 已签约 2 - 已解约
     */
    private int contractType;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTrancode;

    @Id
    @SequenceGenerator(name = "CpsBtContractInfoSequence", sequenceName = "CPS_BT_CONTRACT_INFO_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CpsBtContractInfoSequence")
    @Column(name = "INFO_SQ", unique = true, nullable = false)
    public int getInfoSq() {
        return this.infoSq;
    }

    public void setInfoSq(int infoSq) {
        this.infoSq = infoSq;
    }

    @Version
    @Column(name = "\"VERSION\"")
    public int getVersion() {
        return this.version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "CONTRACT_ID", nullable = false, length = 18)
    public String getContractId() {
        return this.contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Column(name = "MARKET_CUST_ID", nullable = false, length = 10)
    public String getMarketCustId() {
        return this.marketCustId;
    }

    public void setMarketCustId(String marketCustId) {
        this.marketCustId = marketCustId;
    }

    @Column(name = "MARKET_ACCT", nullable = false, length = 19)
    public String getMarketAcct() {
        return this.marketAcct;
    }

    public void setMarketAcct(String marketAcct) {
        this.marketAcct = marketAcct;
    }

    @Column(name = "MEMBER_CUST_ID", nullable = false, length = 10)
    public String getMemberCustId() {
        return this.memberCustId;
    }

    public void setMemberCustId(String memberCustId) {
        this.memberCustId = memberCustId;
    }

    @Column(name = "MEMBER_ACCT", nullable = false, length = 19)
    public String getMemberAcct() {
        return this.memberAcct;
    }

    public void setMemberAcct(String memberAcct) {
        this.memberAcct = memberAcct;
    }

    @Column(name = "MEMBER_ACCT_TYPE", nullable = false, length = 1)
    public int getMemberAcctType() {
        return this.memberAcctType;
    }

    public void setMemberAcctType(int memberAcctType) {
        this.memberAcctType = memberAcctType;
    }

    @Column(name = "CONTRACT_STATUS", nullable = false, length = 2)
    public int getContractType() {
        return this.contractType;
    }

    public void setContractType(int contractType) {
        this.contractType = contractType;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return this.createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "LAST_UPD_TRANCODE", length = 6)
    public String getLastUpdTrancode() {
        return this.lastUpdTrancode;
    }

    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }

}
